/**
 * 
 */
package com.ssm.web.Json;

/**
 * @author xieqiang_daye
 *
 */
public class JsonResult{
  private boolean success;//是否成功
  
  private Object data;//成功时返回的标志
  
  private String error;//错误信息
  
  public JsonResult(){}
  
  //成功时构造函数
  public JsonResult(boolean success,Object data){
	  this.data = data;
	  this.success = success;
  }
  
  //错误时返回
  public JsonResult(boolean success,String error){
	  this.success = success;
	  this.error = error;
  }

public boolean isSuccess() {
	return success;
}

public void setSuccess(boolean success) {
	this.success = success;
}

public Object getData() {
	return data;
}

public void setData(Object data) {
	this.data = data;
}

public String getError() {
	return error;
}

public void setError(String error) {
	this.error = error;
}
  
  
  
}
